import 'dart:convert';

List<StudentLevelProgress> studentLevelProgressFromJson(String str) =>
    List<StudentLevelProgress>.from(
        json.decode(str).map((x) => StudentLevelProgress.fromJson(x)));

String studentLevelProgressToJson(List<StudentLevelProgress> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class StudentLevelProgress {
  StudentLevelProgress({
    this.level,
    this.startDate,
    this.numBooks,
    this.numRead,
    this.readOnly,
    this.order,
    this.endDate,
  });

  String? level;
  int? startDate;
  int? numBooks;
  int? numRead;
  int? readOnly;
  double? order;
  int? endDate;

  factory StudentLevelProgress.fromJson(Map<String, dynamic> json) =>
      StudentLevelProgress(
        level: json["level"],
        startDate: json["startDate"],
        numBooks: json["numBooks"],
        numRead: json["numRead"],
        readOnly: json["readOnly"],
        order: json["order"],
        endDate: json["endDate"],
      );

  Map<String, dynamic> toJson() => {
        "level": level,
        "startDate": startDate,
        "numBooks": numBooks,
        "numRead": numRead,
        "readOnly": readOnly,
        "order": order,
        "endDate": endDate,
      };
}
